<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of createTumorSuppressorsNet</title>
  <meta name="keywords" content="createTumorSuppressorsNet">
  <meta name="description" content="Cretes a protein interaction network involving tumor suppressors for the specified DAS molecular interaction database">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../../index.html">Home</a> &gt;  <a href="../index.html">code</a> &gt; <a href="index.html">examples</a> &gt; createTumorSuppressorsNet.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../../index.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for code\examples&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>-->

<h1>createTumorSuppressorsNet
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>Cretes a protein interaction network involving tumor suppressors for the specified DAS molecular interaction database</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre class="comment"> Cretes a protein interaction network involving tumor suppressors for the specified DAS molecular interaction database

 createTumorSupressorsNet() constructs a protein-protein interaction
 network that consists of interactions among tumor supressor (TS) proteins and
 their interacting partners.

 SYNTAX: [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)
          dasUrl - URL for the DAS service. 
          dsn - database providing ptn-ptn interaction
          display - true/false, to display or not the biograph object

 See also tumorSupressorNetwork_Fig5AB(),
 createTSConnectionHeatmap_Fig5CD()

    DASMiner: DAS library and browser for Matlab.
    Diogo Veiga, Jan 2009.</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../../matlabicon.gif)">
</ul>
This function is called by:
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="createTSConnectionHeatmap_Fig5CD.html" class="code" title="function createTSConnectionHeatmap_Fig5CD()">createTSConnectionHeatmap_Fig5CD</a>	Creates a heatmap of tumor suppressor connectivity from 11 DAS sources that provides protein interaction data</li><li><a href="tumorSuppressorNetwork_Fig5AB.html" class="code" title="function tumorSuppressorNetwork_Fig5AB()">tumorSuppressorNetwork_Fig5AB</a>	Creates a protein interaction network for human tumor supressors (TS) and their interacting partners, as found in PFAM database.</li></ul>
<!-- crossreference -->

<h2><a name="_subfunctions"></a>SUBFUNCTIONS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="#_sub1" class="code">function [label] = findLabel(nodeID)</a></li></ul>
<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)</a>
0002 <span class="comment">% Cretes a protein interaction network involving tumor suppressors for the specified DAS molecular interaction database</span>
0003 <span class="comment">%</span>
0004 <span class="comment">% createTumorSupressorsNet() constructs a protein-protein interaction</span>
0005 <span class="comment">% network that consists of interactions among tumor supressor (TS) proteins and</span>
0006 <span class="comment">% their interacting partners.</span>
0007 <span class="comment">%</span>
0008 <span class="comment">% SYNTAX: [TSnet] = createTumorSuppressorsNet(dasURL,dsn,display)</span>
0009 <span class="comment">%          dasUrl - URL for the DAS service.</span>
0010 <span class="comment">%          dsn - database providing ptn-ptn interaction</span>
0011 <span class="comment">%          display - true/false, to display or not the biograph object</span>
0012 <span class="comment">%</span>
0013 <span class="comment">% See also tumorSupressorNetwork_Fig5AB(),</span>
0014 <span class="comment">% createTSConnectionHeatmap_Fig5CD()</span>
0015 <span class="comment">%</span>
0016 <span class="comment">%    DASMiner: DAS library and browser for Matlab.</span>
0017 <span class="comment">%    Diogo Veiga, Jan 2009.</span>
0018 
0019 <span class="comment">% Tumor supressor genes using official symbols</span>
0020 <span class="keyword">global</span> tsGenes;
0021 tsGenes = {<span class="string">'RB1'</span>, <span class="string">'TP53'</span>, <span class="string">'CDKN2A'</span> <span class="string">'APC'</span>, <span class="string">'BRCA1'</span>, <span class="string">'BRCA2'</span>, <span class="string">'WT1'</span>, <span class="string">'NF1'</span>, <span class="keyword">...</span>
0022     <span class="string">'NF2'</span>, <span class="string">'VHL'</span>, <span class="string">'MEN1'</span>, <span class="string">'PTCH1'</span>, <span class="string">'PTEN'</span>, <span class="string">'SMAD4'</span>, <span class="string">'CDH1'</span>, <span class="string">'STK11'</span>, <span class="string">'SMARCB1'</span>, <span class="keyword">...</span>
0023     <span class="string">'EXT1'</span>, <span class="string">'EXT2'</span>, <span class="string">'TSC1'</span>, <span class="string">'TSC2'</span>, <span class="string">'MSH2'</span>};
0024 
0025 <span class="comment">% Tumor supressor genes using Entrez IDs</span>
0026 <span class="keyword">global</span> tsEntrezID;
0027 tsEntrezID = {<span class="string">'5925'</span>, <span class="string">'7157'</span>, <span class="string">'1029'</span>, <span class="string">'324'</span>, <span class="string">'672'</span>, <span class="string">'675'</span>, <span class="string">'7490'</span>, <span class="string">'4763'</span>, <span class="keyword">...</span>
0028     <span class="string">'4771'</span>, <span class="string">'7428'</span>, <span class="string">'4221'</span>, <span class="string">'5727'</span>, <span class="string">'5728'</span>, <span class="string">'4089'</span>, <span class="string">'999'</span>, <span class="string">'6794'</span>, <span class="string">'6598'</span>, <span class="keyword">...</span>
0029     <span class="string">'608177'</span>, <span class="string">'2132'</span>, <span class="string">'7248'</span>, <span class="string">'7249'</span>, <span class="string">'4436'</span>};
0030 
0031 <span class="keyword">global</span> tsInt;
0032 tsInt = struct(<span class="string">'ts'</span>,{},<span class="string">'EntrezID'</span>,{},<span class="string">'interactors'</span>, <span class="keyword">...</span>
0033     struct(<span class="string">'symbol'</span>, {}, <span class="string">'EntrezID'</span>, {}, <span class="string">'location'</span>, {}) );
0034 
0035 <span class="keyword">for</span> i=1:size(tsEntrezID,2)
0036    
0037     <span class="comment">%eg. http://dasmi.bioinf.mpi-inf.mpg.de/das/hprdEntrez/interaction?interactor=5925</span>
0038     <span class="comment">%eg. http://dasmi.bioinf.mpi-inf.mpg.de/das/ddi/interaction?interactor=5925</span>
0039     [xmlS] = executeDASCommand(dasURL,<span class="string">'command'</span>, <span class="string">'interaction'</span>, <span class="string">'DSN'</span>, dsn,<span class="string">'segment'</span>,tsEntrezID{i});
0040     
0041     tsInt(i).ts = tsGenes{i};
0042     tsInt(i).EntrezID = tsEntrezID{i};
0043     
0044     <span class="keyword">if</span> (isfield(xmlS,<span class="string">'INTERACTOR'</span>))
0045         
0046         <span class="keyword">for</span> j=1:size(xmlS.INTERACTOR,2)
0047             tsInt(i).interactors(j).EntrezID = xmlS.INTERACTOR{j}.ATTRIBUTE.dbAccessionId;
0048             tsInt(i).interactors(j).symbol = xmlS.INTERACTOR{j}.ATTRIBUTE.shortLabel;
0049             tsInt(i).interactors(j).location = <span class="string">''</span>;
0050             
0051             <span class="keyword">for</span> k=1:size(xmlS.INTERACTOR{j}.DETAIL,2)
0052                 
0053                 <span class="keyword">if</span> (strcmp(xmlS.INTERACTOR{j}.DETAIL{k}.ATTRIBUTE.property,<span class="string">'location'</span>))
0054                     tsInt(i).interactors(j).location = xmlS.INTERACTOR{j}.DETAIL{k}.ATTRIBUTE.value; <span class="comment">%chrm location</span>
0055                 <span class="keyword">end</span>
0056             <span class="keyword">end</span>
0057         <span class="keyword">end</span>
0058 
0059     <span class="keyword">end</span>
0060 <span class="keyword">end</span>
0061 
0062 graphLabels = tsEntrezID; <span class="comment">%start with ts ids</span>
0063 <span class="keyword">for</span> i=1:size(tsInt,2)
0064     <span class="keyword">if</span> (size(tsInt(i).interactors,2) &gt; 0)
0065         graphLabels = [graphLabels tsInt(i).interactors(1:end).EntrezID];
0066     <span class="keyword">end</span>
0067 <span class="keyword">end</span>
0068 graphLabels = unique(graphLabels);
0069 
0070 <span class="comment">%Assemble connectivity matrix</span>
0071 cm = zeros(size(graphLabels,2),size(graphLabels,2));
0072 <span class="keyword">for</span> i=1:size(tsInt,2)
0073     
0074     idxTS = strmatch(tsInt(i).EntrezID, graphLabels, <span class="string">'exact'</span>);
0075     
0076     <span class="keyword">for</span> j=1:size(tsInt(i).interactors,2)
0077         idxInt = strmatch(tsInt(i).interactors(j).EntrezID, graphLabels, <span class="string">'exact'</span>);
0078         cm(idxTS,idxInt) = 1;
0079         <span class="comment">%cm(idxInt,idxTS) = 1;</span>
0080     <span class="keyword">end</span>
0081     
0082 <span class="keyword">end</span>
0083 
0084 <span class="comment">%Create network</span>
0085 TSnet = biograph(cm,graphLabels,<span class="string">'ShowArrows'</span>, <span class="string">'off'</span>, <span class="string">'LayoutType'</span>, <span class="string">'hierarchical'</span>);
0086 
0087 
0088 <span class="comment">%Customize nodes in the graph</span>
0089 node_ids = get(TSnet,<span class="string">'Nodes'</span>);
0090 <span class="keyword">for</span> i=1:size(graphLabels,2)
0091     
0092     idx = strmatch(graphLabels{i},tsEntrezID,<span class="string">'exact'</span>);
0093     <span class="keyword">if</span>(~isempty(idx)) <span class="comment">%TS gene</span>
0094         set(node_ids(i),<span class="string">'Color'</span>,[1 0 0]);
0095         set(node_ids(i),<span class="string">'LineColor'</span>,[1.0000 0.7490 1.0000]);
0096         set(node_ids(i),<span class="string">'LineWidth'</span>,1);
0097         set(node_ids(i),<span class="string">'Label'</span>,tsGenes{idx});
0098         
0099     <span class="keyword">else</span> <span class="comment">%other genes</span>
0100         set(node_ids(i),<span class="string">'Color'</span>,[0 0.6824 0.7529]);
0101         set(node_ids(i),<span class="string">'LineColor'</span>,[0 0.8078 0.7529]);
0102         set(node_ids(i),<span class="string">'LineWidth'</span>,1);
0103         set(node_ids(i),<span class="string">'Shape'</span>,<span class="string">'ellipse'</span>);
0104         set(node_ids(i),<span class="string">'Label'</span>,<a href="#_sub1" class="code" title="subfunction [label] = findLabel(nodeID)">findLabel</a>(TSnet.Nodes(i).ID));
0105         
0106     <span class="keyword">end</span>
0107 <span class="keyword">end</span>
0108 
0109 dolayout(TSnet);
0110 <span class="keyword">if</span> (display)
0111     view(TSnet);
0112 <span class="keyword">end</span>
0113 
0114 
0115 
0116 <a name="_sub1" href="#_subfunctions" class="code">function [label] = findLabel(nodeID)</a>
0117 <span class="keyword">global</span> tsInt;
0118 label = <span class="string">''</span>;
0119 <span class="keyword">for</span> i=1:size(tsInt,2)
0120    
0121     <span class="keyword">if</span> (size(tsInt(i).interactors,2) &gt; 0)
0122         ids = {tsInt(i).interactors(1:end).EntrezID};
0123         idx = find(strcmp(nodeID, ids), 1);
0124 
0125         <span class="keyword">if</span> (~isempty(idx))
0126             intLabels = {tsInt(i).interactors(1:end).symbol};
0127             label = intLabels{idx};
0128             <span class="keyword">break</span>;
0129         <span class="keyword">end</span>
0130     <span class="keyword">end</span>
0131     
0132 <span class="keyword">end</span></pre></div>
<hr><address>Generated on Tue 17-Feb-2009 16:59:45 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address>
</body>
</html>